import 'package:flutter/material.dart';

class AlertUtil {
  Future<void> normolAlert(BuildContext context, String msg,Function a,Function b) {
    return showDialog<void>(
      context: context,
      barrierDismissible: false, // user must tap button!
      builder: (BuildContext context) {
        return AlertDialog(
          title: Text('提示'),
          content: Text(msg),
          actions: <Widget>[
            FlatButton(
              child: Text('取消'),
              onPressed: () {a();},
            ),
            FlatButton(
              child: Text('确认'),
              onPressed: () {b();},
            ),
          ],
        );
      },
    );
  }
}
